package game;

/**
 *	@(#)Famine.java
 *
 *	The <code>Famine</code> class represents the famine track of the game.
 *
 *	@author Grzegorz Kobiela
 *	@version 1.0 2007/8/13
 */
public final class Famine
extends GameObject
{
	/** The current position. */
	private int famine = 0;

	/**
	 *	Returns the current position.
	 *	@return the current position
	 */
	public int getValue() {
		return famine;
	}

	/**
	 *	Resets famine.
	 */
	public void reset() {
		famine = 0;
		update(null);
	}

	/**
	 *	Increases famine by one.
	 */
	public void increase() {
		famine++;
		update(null);
	}

	/**
	 *	Decreases famine by one.
	 */
	public void decrease() {
		famine = (famine > 0 ? famine - 1 : 0);
		update(null);
	}
}